package com.compass.mobile.ui.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import com.compass.mobile.R
import com.compass.mobile.databinding.ActivityHomePageBinding
import com.compass.mobile.framework.base.BaseVBActivity
import com.compass.mobile.ui.fragment.FollowingPrescriptionFragment
import com.compass.mobile.ui.fragment.HomeCareFragment
import com.compass.mobile.ui.fragment.PrescriptionRecordFragment

/**
 * Description： 申请续方
 * Date:2024/7/4 9:09
 */
class FollowingPrescriptionActivity : BaseVBActivity<ActivityHomePageBinding>() {


    companion object {
        fun start(context: Context) {
            val intent = Intent(context, FollowingPrescriptionActivity::class.java)
            context.startActivity(intent)
        }
    }


    private lateinit var prescriptionRecordFragment: FollowingPrescriptionFragment
    override fun initView(savedInstanceState: Bundle?) {
        prescriptionRecordFragment = FollowingPrescriptionFragment()
        displaySelectedFragment(prescriptionRecordFragment)
    }

    // 根据需要显示或替换Fragment
    private fun displaySelectedFragment(fragment: Fragment) {
        val fragmentTransaction: FragmentTransaction = supportFragmentManager.beginTransaction()
        fragmentTransaction.replace(R.id.fragmentContainer, fragment)
        fragmentTransaction.commit()
    }
}